package com.lpit.controller;

import com.lpit.dto.HomePageDto;
import com.lpit.result.ResponseResult;
import com.lpit.service.FindArticlesThatUsersWillLikeService;
import com.lpit.vo.HomePageDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Administrator
 */
@RestController
public class FindArticlesThatUsersWillLikeController {
    @Autowired
    private FindArticlesThatUsersWillLikeService findArticlesThatUsersWillLikeService;

    /**
     * 找到用户会喜欢的文章
     *
     * @param homePageDto
     * @return ResponseResult<List < HomePageDto>>
     */
    @RequestMapping("/articlesThatUsersWillLike")
    public ResponseResult<List<HomePageDataVo>> articlesThatUsersWillLike(HomePageDto homePageDto) {
        return findArticlesThatUsersWillLikeService.findArticlesThatUsersWillLike(homePageDto);
    }
}
